package com.ds.infrastructure.hyperspace.console.service.inf;

import com.ds.infrastructure.hyperspace.console.common.methodlock.MethodLockId;
import com.ds.infrastructure.hyperspace.console.entity.table.TbDeployConfig;
import com.ds.infrastructure.hyperspace.console.entity.where.TbCustomWhere;
import com.ds.infrastructure.hyperspace.console.service.BaseService;

/**
 * @author: yaozhendong
 * @create: 2019-10-21 11:45
 **/
public interface IDeployConfigService extends BaseService<TbDeployConfig> {

    Integer selectMaxForConfigVersion(TbDeployConfig where, TbCustomWhere mapWhere);


    void active(MethodLockId methodLockId, TbDeployConfig entity);

    TbDeployConfig selectLastOne(Long stageId, Long environmentId);

    TbDeployConfig getLastOneWithMethodLockId(MethodLockId methodLockId, Long stageId, Long environmentId);

    int updateWithTimestamp(TbDeployConfig newEntity);

    void updateVersion(TbDeployConfig entity);

    TbDeployConfig selectLastOneForInstalled(Long stageId, Long environmentId);
}
